//
//  HomeNetListCell.m
//  ShandsMod
//
//  Created by zh_s on 2023/3/18.
//  Copyright © 2023 zh_s. All rights reserved.
//

#import "HomeNetListCell.h"

@implementation HomeNetListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.accessoryType = UITableViewCellAccessoryNone;
        self.backgroundColor = [UIColor clearColor];
        [self createView];
    }
    return self;
}

- (void)createView {
    
    
    UIView *backV = [[UIView alloc] init];
    [self.contentView addSubview:backV];
    backV.backgroundColor = UIColor.whiteColor;
    backV.frame = CGRectMake(20, 0, SCREEN_WIDTH -40, 70);
    GWRadius(backV, 12);
    
    UIImageView *headerImg = [[UIImageView alloc] init];
    [backV addSubview:headerImg];
    headerImg.image = IMAGE_NAME(@"icon_home_more");
    [headerImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(backV.mas_centerY);
        make.width.height.mas_equalTo(50);
        make.left.mas_equalTo(9);
    }];
    GWRadius(headerImg, 8);
    
    UILabel *titleLab = [[UILabel alloc] init];
    [backV addSubview:titleLab];
    titleLab.textColor = MAIN_BACKCOLOR;
    titleLab.font = FONT_NAME(FONT_Regular, 14);
    titleLab.text = @"这是一个NET名称";
    [titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(headerImg.mas_right).mas_offset(12);
        make.top.mas_equalTo(12);
        make.height.mas_equalTo(18);
    }];
    
    UIImageView *logoImg = [[UIImageView alloc] init];
    [backV addSubview:logoImg];
    logoImg.image = IMAGE_NAME(@"icon_home_net");
    [logoImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(backV.mas_bottom);
        make.width.mas_equalTo(51);
        make.height.mas_equalTo(47);
        make.right.mas_equalTo(backV.mas_right);
    }];
    GWRadius(logoImg, 14);
    
//    self.titleLab = titleLab;
//
//    UIView *lineView = [[UIView alloc] init];
//    [self.contentView addSubview:lineView];
//    lineView.backgroundColor = LINEVIEWCELL_BACKCOLOR;
//    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(67);
//        make.bottom.mas_equalTo(self.contentView.mas_bottom);
//        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH -87, 0.5));
//    }];
    
//    UILabel *priceLab = [[UILabel alloc] init];
//    [self.contentView addSubview:priceLab];
//    priceLab.textColor = TEXT_COLOR_51;
//    priceLab.font = FONT_NAME(FONT_Regular, 12);
//    priceLab.text = @"7866.04";
//    priceLab.textAlignment = NSTextAlignmentRight;
//    [priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.right.mas_equalTo(self.contentView.mas_right).mas_offset(-25);
//        make.top.mas_equalTo(headerImg.mas_top).mas_offset(1);
//        make.height.mas_equalTo(12);
//    }];
//    self.contentLab = cntentLab;
    
//    UILabel *usdPriceLab = [[UILabel alloc] init];
//    [self.contentView addSubview:usdPriceLab];
//    usdPriceLab.textColor = TEXT_COLOR_153;
//    usdPriceLab.font = FONT_NAME(FONT_Regular, 10);
//    usdPriceLab.text = @"≈$12345.44";
//    usdPriceLab.textAlignment = NSTextAlignmentRight;
//    [usdPriceLab mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.right.mas_equalTo(priceLab.mas_right);
//        make.top.mas_equalTo(headerImg.mas_top).mas_offset(15);
//        make.height.mas_equalTo(10);
//    }];
}



@end
